<table class="cluster_container">
    <tr>
        <td class="mpa_names">
            {{ mpa.name }}
        </td>
	</tr>
	<tr>
        <td>    
            <table class="hab_container">
                <tr>
                    <th>Habitat</th>
                    <th>Rep.</th>
                    <th>Quantity</th>
                    <th>Additional Needed</th>
                </tr>
                {% for sort_num,habinfo in mpa.replication_results.items  %}
                <tr class={%if habinfo.replicate%}"replicate"{%else%}"not_replicate"{%endif%}>
                    <td class="hab_name" id="hab{{habinfo.feature_map_id}}">{{ habinfo.name }}</td>
                    <td>{{habinfo.replicate}}</td>
                    <td class="hab_result">
						<span class="rounded" style="text-align: center;">{{ habinfo.result|floatformat:"-2" }}
							{% if habinfo.units|title = "Miles" %}mi{% endif %}
							{% if habinfo.units|title = "Sq Miles" %}mi<small><sup>2</sup></small>{% endif %}
						</span>
						<span class="unrounded" style="text-align: center;">{{ habinfo.result|floatformat:"-6" }}</span>
					</td>
                    <td class="hab_result" style="text-align: center">
						
						{% if habinfo.additional_required = -1 %}
							<span style="text-align: center"><a href="#" class="explain" id="exp_{{ habinfo.feature_map_id }}">Explanation</a></span>
						{% else %}
							<span class="rounded">
								{{ habinfo.additional_required|floatformat:"-2" }}
								{% if habinfo.units|title = "Miles" %}mi{% endif %}
								{% if habinfo.units|title = "Sq Miles" %}mi<small><sup>2</sup></small>{% endif %}
							</span>
						{% endif %}
						{% if habinfo.additional_required = -1 %}
							<span class="reason" id="exp_{{ habinfo.feature_map_id }}_text">{{ habinfo.reason }}</span>
						{% else %}
							<span class="unrounded" style="text-align: center;">{{ habinfo.additional_required|floatformat:"-6" }}</span>
						{% endif %}
					</td>
                </tr>
                {% endfor %}
            </table>
        </td>
    </tr>
</table>